LearningSession.CommitChanges Method

Saves any data of this session that has not been saved. You must call this method to ensure changes are persisted in long-term storage.

Parent Type: LearningSession

Namespace: Microsoft.LearningComponents

Assembly: Microsoft.LearningComponents.dll

Syntax
C#

public virtual void CommitChanges ()

Exceptions
Exception type Condition
InvalidOperationException

Thrown if the state of the session and / or its associated data model are in an inconsistent state.

Remarks

Applications should always call this function after performing any operation that changes the state of the session, such as MoveToNext, MoveToPrevious or Exit.

If there are no changes to save, this method has no effect.